#ifndef _TYPE_DEF_H_
#define _TYPE_DEF_H_
#include <string>
#include <vector>

namespace cgi{
/*
#define REQUEST_METHOD "REQUEST_METHOD"
#define CONTENT_TYPE "CONTENT_TYPE"
#define CONTENT_LENGTH "CONTENT_LENGTH"
#define QUERY_STRING "QUERY_STRING"
#define SCRIPT_NAME "SCRIPT_NAME"
#define PATH_INFO "PATH_INFO"
#define PATH_TRANSLATED "PATH_TRANSLATED"
#define REMOTE_ADDR "REMOTE_ADDR"
#define REMOTE_HOST "REMOTE_HOST"
#define REMOTE_USER "REMOTE_USER"
#define REMOTE_IDENT "REMOTE_IDENT"
#define AUTH_TYPE "AUTH_TYPE"
#define GATEWAY_INTERFACE "GATEWAY_INTERFACE"
#define SERVER_NAME "SERVER_NAME"
#define SERVER_PORT "SERVER_PORT"
#define SERVER_PROTOCOL "SERVER_PROTOCOL"
#define DOCUMENT_ROOT "DOCUMENT_ROOT"
#define SERVER_SOFTWARE "SERVER_SOFTWARE"
#define HTTP_ACCEPT "HTTP_ACCEPT"
#define HTTP_USER_AGENT "HTTP_USER_AGENT"
#define HTTP_REFERER "HTTP_REFERER"
#define HTTP_COOKIE "HTTP_COOKIE"
//fastcgi
#define FCGI_ROLE "FCGI_ROLE"
#define FCGI_DATA_LENGTH "FCGI_DATA_LENGTH"
#define FILE_LAST_MOD "FILE_LAST_MOD"
*/
#define POST_MAX_LENGTH 1024*1024*4 //4M

enum ErrorCode
{
	POST_LENGTH_TO_BIG = -1000
};

struct STCookie
{
	std::string sName;
	std::string sValue;
	std::string sExpired;
	std::string sDomain;
};

struct STFileForm
{
	std::string sFilePath;
	std::string sData;
};

typedef std::vector<STFileForm> FileFormList;

}
#endif